package com.wzg.pldroidplayer.recyclerviewdemo.Util;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by WZG on 2018/4/12.
 */

public class ToastUtil {
    private static Toast mToast;
    public static void showToast(Context context, String str, int duration){
        if (mToast == null){
            mToast = Toast.makeText(context, str, duration);
        }else {
            mToast.setText(str);
        }
        mToast.show();
    }
}
